/***************************************************************************\
 * Copyright (C) by Keio University
 * CVToGLMatrixConversion.hpp created in 10 2011.
 * Mail : fdesorbi@hvrl.ics.keio.ac.jp
 *
 * CVToGLMatrixConversion.hpp is part of the HVRL Engine Project.
 *
 * The HVRL Engine Project is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * The HVRL Engine Project is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 \***************************************************************************/

#ifndef TOOLS__CV_TO_GL_MATRIX_CONVERSION_HPP__
#define TOOLS__CV_TO_GL_MATRIX_CONVERSION_HPP__

#include <opencv2/opencv.hpp>
#include <glm/glm.hpp>

namespace hvrl
{

namespace CVToGLConversion
{

void extrinsicMatrix(const cv::Matx33d& R, cv::Vec3d& t, glm::dmat4& glmodelview);

void intrinsicMatrix(const cv::Matx33d& K, cv::Size windowsize, const double& near,
		const double& far, glm::dmat4& glprojection);

void extrinsicMatrix(const cv::Matx33f& R, cv::Vec3f& t,
		glm::mat4& glmodelview);

void intrinsicMatrix(const cv::Matx33f& K, cv::Size windowsize, const float& near,
		const float& far, glm::mat4& glprojection);

void extrinsicMatrix(const cv::Matx33d& R, cv::Vec3d& t, double(&glmodelview)[16]);

void intrinsicMatrix(const cv::Matx33d& K, cv::Size windowsize, const double& near,
		const double& far, double(&glprojection)[16]);

void extrinsicMatrix(const cv::Matx33f& R, cv::Vec3f& t, float(&glmodelview)[16]);

void intrinsicMatrix(const cv::Matx33f& K, cv::Size windowsize, const float& near,
		const float& far, float(&glprojection)[16]);

}

}

#endif
